package com.guet.ltomanagement.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guet.ltomanagement.common.entities.SysUser;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sjj
 * @since 2021-10-17
 */
public interface SysUserService extends IService<SysUser> {
    /**
     * @Author sjj
     * @Description //TODO 由用户名获取用户的详细信息
     * @Date 2021/10/17 2021/10/17
     * @Param [username :用户名]
     * @return com.sjj.taskmanagement.common.entities.SysUser
     */

    SysUser getByUsername(String username);

    /**
     * @Author sjj
     * @Description //TODO 由用户id获得权限字符串
     * @Date 2021/10/17 2021/10/17
     * @Param [userId 用户id]
     * @return java.lang.String
     */

    String getUserAuthorityInfo(Long userId);
    /**
     * @Author sjj
     * @Description //TODO 清除权限的缓存
     * @Date 2021/10/17 2021/10/17
     * @Param [username 用户名]
     * @return void
     */



    void clearUserAuthorityInfo(String username);
    SysUser register(SysUser sysUser);
    void clearUserAuthorityInfoByRoleId(Long roleId);

    void clearUserAuthorityInfoByMenuId(Long menuId);

    Boolean delete(Integer id);

    List<SysUser> getUserList();

    SysUser getUserInfoById(Integer id);

    SysUser getCurrentUserInfo();
}
